<?php

$files = glob("./upload/*");


var_dump($files);
?>

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<table>
		<tr>
			<td>缩略图</td>
			<td>文件名</td>
			<td>文件大小</td>
			<td>文件类型</td>
			<td>上传时间</td>
			<td>操作</td>
		</tr>
		<?php foreach ($files as $key => $file): ?>
			<tr>
				<td><img width="50" src="<?php echo $file; ?>" alt=""></td>
				<td><?php echo basename($file); ?></td>
				<td><?php echo filesize($file); ?></td>
				<td><?php echo pathinfo($file)['extension']; ?></td>
				<td><?php echo filectime($file); ?></td>
				<td>
					<a href="./donw.php?url=<?php echo $file; ?>">下载</a>
					<a href="./del.php?url=<?php echo $file; ?>">删除</a>
				</td>
			</tr>
		<?php endforeach ?>
	</table>
</body>
</html>